#ifndef _MEMBER_BSERIALPORT_H_
#define _MEMBER_BSERIALPORT_H_

#include <BSerialPort>

#ifdef _WINDOWS_SYSTEM_
#include <windows.h>
#endif

namespace BWE
{
	class member_BSerialPort
	{
	public:
		member_BSerialPort(BSerialPort* serialPort);
		~member_BSerialPort();

		void freshComState();
		void checkError();

		BSerialPort*				boss;
		BString						portName;
		BSerialPort::Mode			mode;
		BSerialPort::BaudRate		baudRate;
		BSerialPort::DataBits		dataBits;
		BSerialPort::Direction		direction;
		BSerialPort::FlowControl	flowControl;
		BSerialPort::Parity			parity;
		BSerialPort::StopBits		stopBits;
#ifdef _WINDOWS_SYSTEM_
		HANDLE		hcom;
#endif

	};
}

#endif